﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Content/Master.Master" ValidateRequest="false" Inherits="System.Web.Mvc.ViewPage<SCS.Core.Models.Collection.StaticArticalCategoryCollection>" %>
<%@ Import Namespace="SCS.Core" %>
<%@ Import Namespace="SCS.Core.Models" %>
<%@ Import Namespace="SCS.Core.ViewModels" %>
<%@ Import Namespace="SCS.Core.Controllers" %>
<%@ Import Namespace="SCSService" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Danh mục nội dung
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" src="/ThemeExtends/AdminSkin/js/jquery.flot.js"></script>
    <script type="text/javascript" src="/ThemeExtends/AdminSkin/js/jquery.flot.stack.js"></script>	
    <link rel="stylesheet" type="text/css" href="/Content/smoothness-1.8.13/jquery-ui-1.8.13.custom.css"/>
    <link rel="stylesheet" type="text/css" href="/Content/smoothness-1.8.13/ui.dropdownchecklist.themeroller.css"/>
    <script type="text/javascript" src="/Scripts/jquery-1.6.1.min.js"></script>
    <script type="text/javascript" src="/Scripts/jquery-ui-1.8.13.custom.min.js"></script>
    <script type="text/javascript" src="/Scripts/ui.dropdownchecklist-1.4-min.js"></script>
    <script type="text/javascript" src="/Scripts/ui.dropdownchecklist.js"></script>
    <%--Validator--%>
    <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcJQueryValidation.js" type="text/javascript"></script>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm((bool)ViewData["IsAdd"] ? "SaveAddStaticCategory" : "SaveEditStaticArticleCategory", "ArticaleMaster", FormMethod.Post, new { siteGuid = "sendFileForm", language = "sendFileForm", id = "sendFileForm", enctype = "multipart/form-data" }))
            {%>
     
     <div class="clear"></div>
       
        <div class="box ">
		    <h2 class="box-header"><%=(bool)ViewData["IsAdd"] ? "Thêm mới danh mục nội dung" : "Cập nhật danh mục nội dung" %></h2>
		    <div class="box-content">

                <label class="form-label">Tên danh mục</label>
                <%= Html.TextBoxFor(m => m.StaticCategoryName, new { @class = "form-field width30" })%> <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.StaticCategoryName) %></span>
                
                 <%--<label class="form-label">Static Categories Alias </label>
                 <%= Html.TextBoxFor(m => m.StaticCategoryAlias, new { @class = "form-field width30" })%> <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.StaticCategoryAlias) %></span>--%>
                 <%=Html.HiddenFor(m=>m.StaticCategoryAlias) %>
                   
                 <label class="form-label"> Access </label>
                 <%= Html.TextBoxFor(m => m.StaticCategoryAccess, new { @class = "form-field small" })%> (Default value : 0)
                 
                 <label class="form-label"> Params </label>
                 <%= Html.TextBoxFor(m => m.StaticCategoryParams, new { @class = "form-field half" })%>
            
                 <label class="form-label"> Sắp xếp </label>
                 <%= Html.TextBoxFor(m => m.StaticCategoryOrder, new { @class = "form-field small" })%> <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.StaticCategoryOrder) %></span>

                 <%if ((bool)ViewData["IsAdd"] == false) { 
                   %>
                        <label class="form-label"> Ngôn ngữ </label>
                        <%= Html.DropDownList("LanguagesID", (SelectList)ViewData["ListLanguage"], "--Select--", new { @class = "width20" })%>
                    
                   <%
                   } %>
                 


                 <label class="form-label"> Danh mục cha </label>
                 <%= Html.DropDownList("StaticCategoryParentID", (SelectList)ViewData["ListParent"], "--Select--", new { @class = "width20" })%>
                 
                 <label class="form-label"> Kích hoạt </label>
                 <%if (Model.StaticCategoryActive == true)
                   {
                   %>
                        
                        <%=Html.CheckBoxFor(m=>m.StaticCategoryActive,true) %>
                   <%
                     }
                   else
                   {
                       if ((bool)ViewData["IsAdd"])
                       {
                       %>
                        
                        <%=Html.CheckBoxFor(m=>m.StaticCategoryActive,true) %>
                       <%
                       }
                       else
                       { 
                       %>
                       <%=Html.CheckBoxFor(m=>m.StaticCategoryActive) %>
                       <%
                       }                    
                   } 
                    %>
                 
                  <label class="form-label"> Ảnh </label>
                 
                  <%if (Model.Images != null)
                   {
                       string src = Model.Images;
                       
                           %>                            
                               <img src="http://paynetvn.com/<%=Model.Images %>" width="130px" alt="" id="imgname" onclick="window.open('/Editor/aspnet/Images.aspx','images',' width=750,height=450,left=150,top=200,toolbar=no,status=0,scrollbars=1,location=0,');" />  
                           <%
                   }
                   else
                   { 
                   %>
                    <img src="/Content/images/noimage.gif" width="130px" id="imgname" alt="" onclick="window.open('/Editor/aspnet/Images.aspx','images',' width=750,height=450,left=150,top=200,toolbar=no,status=0,scrollbars=1,location=0,');" />
                    <%   
                   }
                  %> 
                  <%--<input type="hidden" id="url" name="url"/>--%>
                  <%=Html.HiddenFor(m=>m.Images) %>
    
                 <%=Html.TextBoxFor(m => m.StaticCategoryID, new {@Style="display:none" })%>
               
                 <p>
                <%=ViewData["Result"]%>
                </p>
                    
                 <input type="submit" value="" class="button white_input save_input "/> <!--Button Save-->
                 <a class="button white" href="javascript:history.back();"><span class="icon_text cancel"></span>Đóng</a> <!--Button Close-->
                <%-- <%
                    if ((bool)ViewData["IsAdd"])
                    {

                    }
                    else
                    { 
                    %> 
                        <%= Html.ActionLink("Danh sách nội dung", "ListArticleStatic", "ArticaleMaster", new { id = Model.StaticCategoryID }, new { @class = "button themed" })%>   
                    <%
                    }  
                 %>--%>
                    
                 
	        </div>
	    </div>
        <div class="clear"></div>
    
    
    <% } %>
    
</asp:Content>
